import React, { useState } from 'react';
import Gongzuotai from '@/pages/Gongzuotai/Gongzuotai'; // 确保路径正确

const BackGround: React.FC = () => {
  const [isModalVisible, setIsModalVisible] = useState(false);

  const showModal = () => {
    setIsModalVisible(true);  // 显示模态框
  };

  const handleClose = () => {
    setIsModalVisible(false); // 隐藏模态框
  };

  return (
    <div>
      <button onClick={showModal}>显示表单</button>
      {isModalVisible && <Gongzuotai isVisible={isModalVisible} onClose={handleClose} />}
    </div>
  );
};

export default BackGround;
